/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.powerhua.favorite.logic.impl;

import com.powerhua.core.utils.WebPathUtils;
import com.powerhua.core.xml.XmlUtil;
import com.powerhua.favorite.logic.ContentManager;
import org.dom4j.Document;

/**
 *
 * @author Brian
 */
public class ContentManagerImpl implements ContentManager {

    @Override
    public String getContentListXml() {
        String fileSeparator = System.getProperty("file.separator");
        String xmlPath = WebPathUtils.getWebInfPath() + "template" + fileSeparator + "favorite" + fileSeparator + "favorite_list_table.xml";

        Document doc = XmlUtil.getDocument(xmlPath);

        String xmlFileStr = doc.getText();
        return xmlFileStr;
    }

    @Override
    public String getContentById(String id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void saveContent(String content) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
